home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
pc
/
pm65sdk
/
sourcecode
/
includes
/
cibasic.h
next >
Wrap
C/C++ Source or Header
|
1996-11-18
|
4KB
|
128 lines
/**[f******************************************************************
* CIBasic.h -- CIBasic Interface definition
*
* Copyright (c) 1996 Adobe Systems, Inc. All Rights Reserved
*
*
* ABSTRACT:
*
* USAGE:
*
* ROUTINES DEFINED:
*
*
**f]******************************************************************/
#ifndef __CIBASIC_H
#define __CIBASIC_H
#include "PMEvent.h"
// DataType used by GetParm
typedef enum
{
PMXTShort = 0,
PMXTHandle,
PMXTLong,
PMXTByte,
PMXTText,
PMXTBool
} eDataType;
// DataType for Co-ordinate system utility routines
#ifndef DC
typedef short DC; // screen device coordinates
typedef short WC; // World Coordinates
typedef struct __WCPOINT {
WC x;
WC y;
} WCPOINT, DCPOINT, *LPWCPOINT, *LPDCPOINT;
typedef struct __LONGPOINT {
long x;
long y;
} LONGPOINT, *LPLONGPOINT;
#endif
class CIBasic : public CIInterface {
public:
// Memory functions. Plug-ins are strongly recomended to use
// these function to manage their memory.
virtual void *PMMemAlloc(unsigned long) = 0;
virtual void PMMemFree(void *) = 0;
virtual void *PMMemRealloc(void *, unsigned long) = 0;
// Windows only basic functions
#ifdef WINDOWS
virtual HINSTANCE GetPMInst() = 0;
// Retrieve the PageMaker external resource instance.
virtual HINSTANCE GetPMResInst() = 0;
#endif
// Set library property (i.e. kStayInMem) return old property
// If you want to turn off kStayInMem, you should do the following
// pBasic->SetPlugInLibProperty(pBasic->GetPlugInLibProperty() & ~kStayInMem))
virtual PMXErr SetPlugInLibProperty(unsigned long theProperty)=0;
virtual unsigned long GetPlugInLibProperty()=0;
// Retrieve the version of PageMaker plug-in interface
virtual unsigned short PMInterfaceVersion() = 0;
// Registration of PMEvent
virtual PMXErr RegisterPMEvent(PMEventID eventID) = 0;
virtual PMXErr UnregisterPMEvent(PMEventID eventID) = 0;
// Plugin Command Param Block - extract data from PMEVT_PLUGIN_COMMAND ParamData
virtual char *LockData(void * ParamData, int ParamNumber=0) = 0;
virtual PMXErr LockData(void * ParamData, void * pBuffer, int BuffSize) = 0;
virtual void Unlock(void * ParamData, int ParamNumber=0) = 0;
virtual PMXErr GetParm(void * ParamData, int ParamNumber, int DataType, void * pBuffer) = 0;
// Co-ordinate system utility routines
virtual PMXErr SetDCOrg(LONGPOINT *pNewPubDC, LONGPOINT *pOldPubDC) = 0;
// position of the center of pasteboard offset from the upper-left-hand corner of
// the pub window and the screen (in pixel)
virtual PMXErr GetDCOrg(LONGPOINT *pPubDC, LONGPOINT *pScreenDC) = 0;
// get ruler zero point relative to the center of the pasteboard (in twips)
virtual PMXErr GetRulerOrg(LONGPOINT *pRulerOrg) = 0;
// Coordinate conversion procedures includes offset from Pub origin
virtual DC WCtoXDC(WC xwc) = 0;
virtual DC WCtoYDC(WC ywc) = 0;
virtual WC XDCtoWC(DC xdc) = 0;
virtual WC YDCtoWC(DC ydc) = 0;
// Long versions of coordinate conversion procedures.
virtual DC LWCtoXDC(long lwc) = 0;
virtual DC LWCtoYDC(long lwc) = 0;
virtual long XDCtoLWC(DC xdc) = 0;
virtual long YDCtoLWC(DC ydc) = 0;
// Unit conversion procedures no offset from origin
virtual DC WUtoXDU(WC wu) = 0;
virtual DC WUtoYDU(WC wu) = 0;
virtual WC XDUtoWU(DC xdu) = 0;
virtual WC YDUtoWU(DC ydu) = 0;
virtual long LXDUtoLWU(long xdu) = 0;
virtual long LYDUtoLWU(long ydu) = 0;
// point conversion procedures
virtual void WCtoDC(LPWCPOINT pwcpoint, LPDCPOINT pdcpoint) = 0;
virtual void DCtoWC(LPDCPOINT pdcpoint, LPWCPOINT pwcpoint) = 0;
virtual void WUtoDU(LPWCPOINT pwcpoint, LPDCPOINT pdcpoint) = 0;
virtual DC LWUtoXDU(long wu) = 0;
virtual DC LWUtoYDU(long wu) = 0;
virtual long LWUtoLXDU(long wu) = 0;
virtual long LWUtoLYDU(long wu) = 0;
};
class CIPMInfo : public CIInterface {
public:
virtual char *GetRegisterUserName()=0;
virtual char *GetRegisterCompanyName()=0;
virtual char *GetRegisterSerialNumber()=0;
virtual void GetVersionNumber(unsigned short *pMajorVerionNumber, unsigned short *pMinorVerionNumber)=0;
// virtual PMLANGUAGE GetPMLanguageVersion()=0;
};
#endif